/*    */ package com.cr.web.controller.monitor;
/*    */ 
/*    */ import com.cr.common.annotation.Log;
/*    */ import com.cr.common.core.controller.BaseController;
/*    */ import com.cr.common.core.domain.AjaxResult;
/*    */ import com.cr.common.core.page.TableDataInfo;
/*    */ import com.cr.common.enums.BusinessType;
/*    */ import com.cr.common.utils.poi.ExcelUtil;
/*    */ import com.cr.framework.shiro.service.SysPasswordService;
/*    */ import com.cr.system.domain.SysLogininfor;
/*    */ import com.cr.system.service.ISysLogininforService;
/*    */ import java.util.List;
/*    */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.GetMapping;
/*    */ import org.springframework.web.bind.annotation.PostMapping;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ import org.springframework.web.bind.annotation.ResponseBody;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"/monitor/logininfor"})
/*    */ public class SysLogininforController extends BaseController {
/* 30 */   private String prefix = "monitor/logininfor";
/*    */   
/*    */   @Autowired
/*    */   private ISysLogininforService logininforService;
/*    */   
/*    */   @Autowired
/*    */   private SysPasswordService passwordService;
/*    */   
/*    */   @RequiresPermissions({"monitor:logininfor:view"})
/*    */   @GetMapping
/*    */   public String logininfor() {
/* 42 */     return this.prefix + "/logininfor";
/*    */   }
/*    */   
/*    */   @RequiresPermissions({"monitor:logininfor:list"})
/*    */   @PostMapping({"/list"})
/*    */   @ResponseBody
/*    */   public TableDataInfo list(SysLogininfor logininfor) {
/* 50 */     startPage();
/* 51 */     List<SysLogininfor> list = this.logininforService.selectLogininforList(logininfor);
/* 52 */     return getDataTable(list);
/*    */   }
/*    */   
/*    */   @Log(title = "登录日志", businessType = BusinessType.EXPORT)
/*    */   @RequiresPermissions({"monitor:logininfor:export"})
/*    */   @PostMapping({"/export"})
/*    */   @ResponseBody
/*    */   public AjaxResult export(SysLogininfor logininfor) {
/* 61 */     List<SysLogininfor> list = this.logininforService.selectLogininforList(logininfor);
/* 62 */     ExcelUtil<SysLogininfor> util = new ExcelUtil(SysLogininfor.class);
/* 63 */     return util.exportExcel(list, "登录日志");
/*    */   }
/*    */   
/*    */   @RequiresPermissions({"monitor:logininfor:remove"})
/*    */   @Log(title = "登录日志", businessType = BusinessType.DELETE)
/*    */   @PostMapping({"/remove"})
/*    */   @ResponseBody
/*    */   public AjaxResult remove(String ids) {
/* 72 */     return toAjax(this.logininforService.deleteLogininforByIds(ids));
/*    */   }
/*    */   
/*    */   @RequiresPermissions({"monitor:logininfor:remove"})
/*    */   @Log(title = "登录日志", businessType = BusinessType.CLEAN)
/*    */   @PostMapping({"/clean"})
/*    */   @ResponseBody
/*    */   public AjaxResult clean() {
/* 81 */     this.logininforService.cleanLogininfor();
/* 82 */     return success();
/*    */   }
/*    */   
/*    */   @RequiresPermissions({"monitor:logininfor:unlock"})
/*    */   @Log(title = "账户解锁", businessType = BusinessType.OTHER)
/*    */   @PostMapping({"/unlock"})
/*    */   @ResponseBody
/*    */   public AjaxResult unlock(String loginName) {
/* 91 */     this.passwordService.clearLoginRecordCache(loginName);
/* 92 */     return success();
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\classes\com.zip!\com\cr\web\controller\monitor\SysLogininforController.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */